package com.gzk.oeno.ihm.vin.form;

import com.gzk.oeno.business.appellation.Appellation;
import com.gzk.oeno.business.appellation.AppellationManager;
import com.gzk.oeno.ihm.common.SimpleNameForm;
import com.gzk.utils.CustomException;

public class AppellationForm extends SimpleNameForm<Integer, Appellation>{

	public AppellationForm() {
		super(AppellationManager.getInstance());
	}

	@Override
	protected Appellation fromForm() throws CustomException {
		Appellation appellation = original != null ? original : new Appellation();
		appellation.setName(getNameField().getText());
		
		return appellation;
	}

}
